<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Dessert House - 经理</title>
<link href="/ChristineCake/css/Management_List_NoButton.css"
	rel="stylesheet" type="text/css" />
<jsp:useBean id="statistics" type="bean.MemberCardStatistics"
	scope="request" />
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
	google.load("visualization", "1", {
		packages : [ "corechart" ]
	});
	google.setOnLoadCallback(drawChart);
	function drawChart() {
		var data = google.visualization.arrayToDataTable([
				[ '会员卡状态', 'MemberCardState' ],
				[ '未激活',
<%=statistics.getNonActivated()%>
	],
				[ '激活',
<%=statistics.getActivated()%>
	],
				[ '已暂停',
<%=statistics.getStopped()%>
	],
				[ '已停止',
<%=statistics.getCancelled()%>
	] ]);

		var options = {
			backgroundColor : '#ffffaa'
		};

		var chart = new google.visualization.PieChart(document
				.getElementById('chart_div'));
		chart.draw(data, options);
	}
</script>
</head>

<body>

	<div id="header">
		<div id="logo">
			<img src="/ChristineCake/image/logo.png" alt="logo" width="100%"
				height="100%" />
		</div>
		<div id="logout" align="right">
			<a href="/ChristineCake/jsp/LogIn.jsp">登出</a>
		</div>
	</div>

	<div id="menu">
		<ul>
			<li><a href="/ChristineCake/MemberCardStatisticsServlet">用户信息统计</a></li>
			<li><a href="/ChristineCake/TotalSaleStatisticsServlet">销售信息统计</a></li>
			<li><a href="/ChristineCake/MonthSaleStatisticsServlet">销售趋势预测</a>
		</ul>
	</div>

	<div id="panel">
		<div id="list">
			<ul>
				<li id="listhead">用户信息统计</li>
				<li><a href="/ChristineCake/MemberCardStatisticsServlet">会员卡信息</a></li>
				<li><a href="/ChristineCake/MemberAgeStatisticsServlet">会员年龄</a></li>
				<li><a href="/ChristineCake/MemberGenderStatisticsServlet">会员性别</a></li>
			</ul>
		</div>

		<div id="content">
			<%
				if (request.getParameter("exception") != null) {
					out.println("<b>异常会员过多！请注意！</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
				}
			%>
			<div id="chart_div"></div>

		</div>
	</div>

	<hr />

	<div id="footer">
		<p>©南京大学软件学院 李冰洁</p>
	</div>

</body>

</html>